package com.ruoyi.quartz.task;


import com.alibaba.fastjson.JSONObject;
import com.ruoyi.bizsys.domain.ExtMonnifyOrder;
import com.ruoyi.bizsys.domain.RepaymentOrder;
import com.ruoyi.bizsys.mapper.ExtMonnifyOrderMapper;
import com.ruoyi.bizsys.mapper.LoanDeferredOrderMapper;
import com.ruoyi.bizsys.mapper.RepaymentOrderMapper;
import com.ruoyi.bizsys.service.IRepaymentOrderService;
import com.ruoyi.business.component.RepaymentMqSendService;
import com.ruoyi.business.service.IDoRepaymentLastService;
import com.ruoyi.common.utils.DateUtils;
import jodd.util.Base64;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;

import java.util.Date;
import java.util.List;

/**
 *
 *定时任务：每天尼日时间凌晨00:00执行定时任务，将来源是催收系统且状态为处理中的延期订单改为取消；
 * 催收系统发起的延期订单只在当天有效；
 * @author ruoyi
 */
@Slf4j
@Component("collectionWalletBuyDefferTask")
public class CollectionWalletBuyDefferTask {

    @Autowired
    LoanDeferredOrderMapper loanDeferredOrderMapper;


    /**
     * CollectionWalletBuyDefer
     */
    public void runTask() {
        loanDeferredOrderMapper.LoanDeferredOrderFaild(DateFormatUtils.format(new Date(), DateUtils.YYYY_MM_DD+" 00:00"));
    }
}